Fix cache bug
General fixes after Lint inspection