Fixed Issue #1039
Merge pull request #1061 from diegosarmentero/collapse_if_while

Fixed Issue #1039