Made event checking/array setting on one line.