Fix a serious bug, and improve the perform in Arrays.