fixed broken code expansion