fix hooks for validation