Fixed stored procedure for Grp and Email