Added special case for integer powers.