Fix bug in git code