Fix issue where mat size 1 times mat size 0 fails