Some imagemagick bugs fixed