Fix bugs in DSL