Ensure exceptions are caught and that tags keep being correctly set