fixed errors after validation