Fixed a bug which was causing some pages to throw errors