Fix in catching exceptoins