Fix offset training and testing