fixed data-managment bug