Small fixes

Small fixes
do not assign in an if statement.