Bug fixes to first-zeros (sorting and navigation)