fixing loading state