fixing validation erors