Fixed *Empty metadata if templates are reloaded form xml*