minor bug fixes involving close