Fix rendering bug