Fixed wrong array size when creating timeline.