fix execute function