Fixed crazy rendering bug that caused framerate to drop