Fixing bug when loading spinner is clicked