My version of mgizapp. Fixed a small bug which prevented calls from php