Don't set num_outputs unless the value actually changes. Closes #79