fix buggy mygitps1 function