Fix issue847