just a few minor changes to mosaic.py