bugfixes and changes