enhanced flag to trigger matrix inverse recomputation, fixed typos