fixed auto-closing