fix initial load of the data with $apply()