Minor fix to inifinite loading.