fix error raising