fix exception usage