fix bug dars-21 and dars-31 bugs