fixed several regressions for #220