aiw2013/demo: fixed the wall distance check