correction getOffset method