Fix non-coniguous case