Added checks to make sure passed element ID is greater than current head