Fix some common mistakes when training