bug with exception fixed