workaround for exception while waiting for error code (#48)