Fix for the loading spinner not showing properly