Small fix to exceptions