fixed bug that caused pages to stop working