Fixed test and catch problem