Judge shows mercy on habitual offender