Fixed bug when trying to retrieve an element by an ID that doesn't exist.