Used jquery's inArray wrong, caused bug on main list page