Fixed sockets, db now works