Fixed avwrapper exit calls, fixing issue 752