Should fix ticket #6634 Signed-off-by: James Almer <jamrial@gmail.com> (cherry picked from commit 881e1f5a)