bugfixes and minor updates