Found the problem, hidden getchar(). Sorry