Fixes after merge from master for Lem updates