fix rendering bug with reactive templates