fix #501 Add id in the correct bean for template load

Close #501