bugfixes in library