fixed offset bug for safari and opera