Fix assign variable in condition