bugfixes in previous correction