fix for required fields validation bug