fixed a bug in case of fields validation error