Bugfix: fixed the bug that does not allow to connect via socket