fixed failing before each hook