To prevent flickering when back to other activity.