Improve updateEmptyContent logic