fix tostring for external references
revert back fix for Kernel module, as it doesn't work and replace Kernel with Object there