fixed loading spinner bug