fix to timeline.js drawing bug