Fix problems with negative powers and parentheses reported by Goeff.