Fixed a bug that was causing too many draw calls.