Build support and bugfixes