Changed saving to not occur if there is no data