Fixed compiling error
Added more non zero methods for matrices