bugfixes and restart