bug fix with seeking and ending.