fix error catching thing