Fix a compiler warning

fixes #8114