fixed flickering problem...finally