Improve on functionality for matrices with zero dimensions