Fixed bug relating to values getting erased after yale matrix resizing