Added check to make sure anchor exists