Fix #29, added case distinction of Pow function