fix for cachematrix after end of class