correcting validation errors