fix missing if
Merge pull request #504 from ingwinlu/fix_erlang_if

fix missing if