Fix data size bugs