Gitfs fixes

This pull request contains two gitfs bugfixes.