Fixes clustering bugs