Jianfeng/check offsett problem

@jakebiesinger It solved the wrong offset problem.