Fixed clustering algo
fixed node type bug