Improve stability of timeline scrolling.
Fix bug of sql sentence.