Pre cherry-pick
Fixed handleIf which got lost in a merge