fix eventmachine bug

fix eventmachine exception