BUG: fix different raise type