some more fixes to almost get things working