some fixes for hooks