fix doubled save on ctrl-s
fix MPS-17824: illegal access
fix MPS-17819: illegal access