fixed bug where md files crashed program but cant get markdown mode to work correctly