Fixed flashing while drawing