fixed a few blinking problem