Fix assign variable in condition

Small fix