bugfixes and minor improvements
prepare 0.4.1