added events for compound/array ending