soc-prob: fixed if cycle

Needed to fix #1 .