Fix disconnect method to close connection

Fix copy-pasted disconnect method from