fixed a bug with data