Reverse Polish working properly