Fixed a couple of important lines when updating capacity_ that were not updated earlier.