changed state error messge in scan()