fix missing raise statement
fix compatibility with older hwps