Changed a few more .close() statements