correction of stored procedure templates