fixed getElement offset calc bug