Fix exec behaviour