bugfix on restart