Fix for infinite spinner bug