fix validation errors