large bugfixes