Fixed bug when creating new data;