Fix catch handling