Fix APPPATH problem