Tiny error catching fix