Made socket.invoke a little better