Fixed bug in IN list creation