fixed arrray issues