Fix for #398

Signed-off-by: ziycon <ziycon.eire@gmail.com>