Code fixes for orphan "if".
Total n00b.