Fix crash in reloadData

Fix the crash while reloading data.