fixed the double-display bug