bug fixed #1 and hook bug fixed