Fix possible endless render recursion