fix routes issue for hooks