bugfixes
minor improvements