Finishes fixing ticket #8771 Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 320694ff84)
320694ff84