Fixing bug with spinner loading order function