Tentative fix for #1162

Signed-off-by: Ross Allan <rallanpcl@gmail.com>