Fix postfix calculation logic