fix bug when className is null