Fixing bug that prevented correct template rendering (sdk reference was being lost).
Simplifying validations.