critical bugfix, index out of bounds in some cases (app crashes and after that launching is impossible if settings file is not edited manually)