Fix bug with cluster grid not freed correctly (#41)