Silhouette code works, but doesn't always give the same result