Bug fix for substituteExpression in Pow