Fix some errors in pages module