fixed some data bugs