cleanup to get magit working properly