fix error caused due to magit mode