bug fix
handle exception