showing/hiding download button at the right time