Flight Track Log ? AAL158 ? 15-Mar-2017 ? KMIA - CUN / MMUN ? FlightAware
The aircraft leveled out at 3000ft (probably due to traffic) then continued the climb after about one minute. At no stage did it descend. It commenced the left turn on reaching 3000ft.
Edit;
Looking at flightradar24, the conflicting traffic was probably N216PK, a PAC P-750 climbing through 4000ft south to north.