dsl: a few bug fixes