more fixes for compatiblity with Havana