we need to bind the state object otherwise it becomes the socket object
fix lint errors