fixed problem with my arrays when removing items while looping