fix some offset issue