Bugfixes and library updates