Added arraysizte check