Set loading state only when actually loading data