Bugfixes for starting/ending