bugfixes, better concurrency