Loading animation bug fix