resolve bugs in loading animation