Fix deadlock. Catch errors.