fix index out of bounds for rapid action checking