more fixes for #194 -- I think I see why parts if it were not working, hopefully this will fix the rest