fix pages controller for if no params