fixed pass-by-reference bug in draw_data with draw=freq