some minor fixes to generating templates for xuser add/update