training label edge case bug fix