Okay, weird error in AppController fixed. Again it worked locally but not on deployment.