fix register posttype hook