Rendering book

+ fixed bugs with undefined results