Fix for opening files that was breaking when using ctrl p.