Fixed bug in account validation on errors