correctly handle 0^0