fixed a problem with imagemagick tree elements recognition