Added check if element exists