Fix data output bug