fix na missing bugs in positive rate encoder