Fixed the tree placement bug