Fix maskededit.py according to Robin's code