Fixed bool variable assignment

Here might be the fix.