Fixed issue with media position being set before media end.