This should fix PR#1316 properly. Signed-off-by: fandehui <fandehui@xfusion.com> (cherry picked from commit 3878b457fcae252f3533d70aa1ddbba6c2ba3821)