Prima della fgets inserisci una

fflush(stdin);

(anche se non e' standard) per pulire il buffer.