fix bug in ext command