fix phrase underflow, thanks to Liusic