Fixed AJAX hook for creating Tree

Had mistake in one WP AJAX hook that prevented tree graphs from being
created properly