bugfixes, removed duplicate patch