Fix badge page when pageContext is null