fixed some errors in RPN