added logic around hasRendered flag