fix #7;always close selector even error occurs