Expand @type correctly when debug flag is set