Fix offset problem