fixing some more compile problems after ml refactoring