Possible fix for #919

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