fixed Firefox offset bug