Fixes some bugs with gitfs.