Fixed problem when removing the initialization matrix variable before using the cached matrix first.