fixed raise for py3