corrected pages controller error