fixed offset

offset is not properly implemented