fix bug in exec