Attempted a temporary fix for https://github.com/leo-editor/leo-editor/issues/40.