Fixed a bug with rendering hook templates