Lemme guess, you called scanf to read the menu option.

FAQ > Flush the input buffer - Cprogramming.com