fix getElement method