Fixing bug where data was exponentially added