Fixes issue with only the last external command being registered.