fix javascript error in pageData