removed closed connections from the array, made 'enter' key not reload page