Can you put a comment on this line explaining why we need to call show() immediately before hide()?