Bug fix on cachematrix.R