Fixes for stage 2 clustering algo