Fixed avwrapper exit calls, fixing issue 752
fixed previous commit