partial libevent open fix