wow, I goto small claim few times a month for landlord-tenant disputes, this will be the first time I hear a judge would said some like that.
did you provide an detail itemized list of claim on what you suing for? next time you goto count, make a list of things you want to said so you don't miss your point.
you can try to file a motion to correct error to the same judge, see if the judge will reconsider. or you can appeal the case to a higher court.
but if you don't do any thing, you need to refund the money, you don't want to go to jail for contempt.
I am not an attorney, just a landlord like you.