fixed bug for && and ||