Fix StaticPartitioning when some partitions do not have a solutions.

+ Typos + code quality.