Solved onended problem on videos