Fixed an error which prevented the homepage from being displayed when debug was set to 0.