Fixed warning on catching by using reference