Error messge has been shown on wrong input