fixed display bug on Mac