bugfixes, improvements