Moved ResolveVariableAttribute and fixed extra print