Stopping getting all data many times