fixed small bug (clearing data 2 times)