fix hooks bug