various fixes to make testing possible