fixed a bug with popup messages when giving wrong input