More fixes, should work fine with dub now