Playing C scale, middle finger bumping into black keys when crossing thumb

When playing C major scale with right had, after crossing my thumb under middle finger, as soon as my middle finger lifts into the next position, it bumps into black keys . Or when crossing under ring finger, then my ring finger bumps into the black keys. Is this normal? or I'm doing it wrong?