Fixed a bug which on submit shows validation error