Fix segmentation faul issue on get_minor