Trying to fix the condition