Fix git integration

Fixes two issues with the git integration. Details in commits.