Added guard clause to prevent trying to ghost an element that doesn't exist (fixes #1)