Fixed a bug with checking state.loadingInProgress
Fixed bug with checking state.loadingInProgress