offset didn't work correctly