fix problem with offset