bugfixes for BOLT merge