fixed blinking problem