switch to dub + a few bug fixes