Several fixes (in progress)