Fixed typo and added manual close_connection query