Fix a hook for projectile, because the init file has the function which isn't loaded yet
Fix compile warning due to use obsolete functions and variables