fixed the wormhole to know how to deal with errors