before moco
some minor bug fixes
tes
cannot remember the details. commit to sync with github.