serious bugfixes