Small changes in mast.py