After trial expire status become expired instead of trail_expired

If I manually expire membership from admin then it set to Trial_expired. but during cron expire it set to Expired. and status changes in this sequence.

Trial -> Active -> expired.

Don’t know why membeship go to active state.

I have setup integration with AGILE CRM

so based on status of membership tags are get changed there.

so it create issues for me in check_membership_status function