Resolved some bug, but still has a connection bug