Fix variable refs for template usage with application resource method for database.