fixed flickring problem