Fixed git repo check bug once and for all