Bug fixes for minimum needs tool