Fixes bug in cluster code.