bugfix in JS_dismat