fixes for getting elemets from DOM