Fixed inconsistent rendering bug