now error message is displayed only once