fixed issue with in() function