Some validation
Merge branch 'master' into toan
Fixed if stmt, I think
multiple dedenting works