Fix ordering for arrays containing zero