Fix offset errors