collision problem when pushing

Hello, I have a collision problem when my character collides with a shell, the problem is the direction, when I push on one side, it pushes fine, but on the other side it pushes in the same direction as the previous one. Is there a way to push it in the right direction?

cap1

in the shell

in mario