Fixing url problems in page controller