fixed a bug: it was not possible to free data and to add new data again.