minor bug fix in generate motion statistics