branch mw4: fix bugs in ipl.py