Fix #1061

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