fix bug in compilation of `and' and `or'; more robust underflow detection.