2.7-1: Tightened allocation/initialization to prevent possible memory access issue; fixed bugs in predict for multivariate y