fix bug when display is null