Misc fixes

Some minor issues not bound to any YouTrack bugs.