fix undefined $secret