bugfixes and additions