fixed pre hook bug