making sure the spinner always stops