fix for https://github.com/fotonauts/MongoHub-Mac/issues/123 and https://github.com/fotonauts/MongoHub-Mac/issues/128