fix to check exception