Reset data array to [] when view first renders

Bug fixed