Fixed a couple of bug in RenderObject (bufferSize reserving, added errorchecking)