fix issue #306

Signed-off-by: xiehuc <xiehuc@gmail.com>