fixed socket problem. Used incorrect file descriptor...