fix bug close()