Fixed some bugs in event velocity computation