Fix the bug in calculating object box offset