Fix errors when used with fugitive