restored default loss in demo