Fixed the bug that the selector is not hidden