typo and connection cleanup