Fixed the RenderTree class to be able to work for previews aswell