Trying to fix the If condition