Fixes part of ticket #8771 Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 2c844c9828)
2c844c9828