fix onBeforeShow problem to fetch the cleaned certificate name