Fixed deprecation warnings introduced by 97774429aeb54df4c09895c07cd1b09e70201f7d.