Change drawer code so that code generation works properly

Change drawer code so that code generation works properly