Shrink Wrap Constraint Problem

Hello,

I have a problem I have beens struggeling with for a while now. I am using a shrink wrap constraint to make bones stick to a surface while they are moved around. It works great except for one problem; in some areas they snap to the wrong side of the surface. If I have a 0.1 distance then it might suddenly move 0.2 BU to end up stuck on the other side of the surface. It feels very weird becuase it is suppose to stick to the closest surface but still it is doing these jumps.

I have tried to extrude the surface to give it a volume in attempt to making the other side of the surface not being a surface pointing outwards to the space. I have also checked my normals since I thought that could be a problem, that the distance id set from the normal. But no, all of them are pointing correctly. I have tried the three different methods available but I can’t get anyone of them to work as I want. Increasing the number of faces in the surface mesh doesn’t change anything either. Repositioning the bones in edit mode doesn’t seem to do anything either.

Do you have any ideas on what I can do to shrink wrap my bones and make them stay on the correct side of the mesh?

Thanks in advance!