Fixes matrix to float* cast.