fixed in_array condition