fixed malloc call on menu_tools