Nice work cclaerhout!
Although there seems to be another bug, when rolling multiples of a d10 sometimes it drops the last image of the dice. For instances if I do 2d10 I only see one image of the dice and if I do 3d10 I only see 2 images. It seems to replace an image with the "D10" at times.
Here is an example that I have:
http://www.darkram4.com/forums/showthread.php?p=9#post9