Fixing && and || logical operators