handle offset issue