Made initial connection to server less buggy