fix for bug 527 and correct return data structure in case zero ideal is passed to primdecZ