fixing array resetting, checked browsers