Fixed issues with APPPATH