Issue with null data error before loading