fix warnings in scope lock