typo fixed in condtion check