closed scope, and fixed Text rendering issues