further improvement of missing c-return events patch