Fixed error in render code. It is now tested and accurrate. :D