Fix data handling