fixed error from null socket