fixing issues with offset