bugfixes and documentation update