bugfixing from bjoern