fixed memory leak in draw_main (missing delete)