Adds/Fixes template events