Fixed NPE that occurs when no sections selected.