Fix so that it doesn't disconnect from server after every call