Fix wrong logic caused by #1452
Fix wrong logic caused by #1452
Ouf...eventually I will commit properly!
Port Fixes for rmuller/infomas-asl#16