Fixed a small hooks undefined problem.