Automatically close empty stage views after refreshing