bug fix for get_minimal

as above