fixed a bug that caused trees not to render and an exception to be thrown