bugfixes in begin and middle