Bugfix when adding new data