Fixed bugs in main_iid.py

Signed-off-by: David Evans <dgevans42@gmail.com>