fix issue 2788 for operating 4x1 matrix and scalar