fixing some validation errors