Workaround an issue where terminals werne't closing