My 'a' and 'c' fingers especially were really prone on misbehaving when I started out (splaying or hitting a string when they weren't supposed to. It was horrible, trust me, I was there!). Personally, I found this helpful when I was working on the fingers of my right hand:
Eye your right-hand so that each finger's knuckle lies above the string it's supposed to be playing. That done, get a feel for the spacing between each string while looking away from the hand (I usually closed my eyes). Once your mind and hand learn the space they have to operate in, I find the hand settles in a comfortable posture that works for you as a player, with spacing between each finger that works for your specific hand.
Repeating this bit of advice because it's really good: start slow, work up.
(As a sort of aside, I tried practising with one of those stretchy nylon gloves - fingerless or otherwise - and it kind of helps to 'block out' your hand's movements, since naturally, wearing a glove is restrictive and you can only use broader motions. I found it actually helped with both hands but I never used it beyond, perhaps, two or three practice sessions).
Hope this helps and I didn't veer off the track too hard!