inArray function return fixed, some small design changes