Changed privileges of setOutputObject(); and added isset() check for REQUEST_URI