Bug fixed, due the matrices w_r and w_r have different # of rows and colums