Fix a bug in code

Fix a bug in code

Signed-off-by: Chulakorn Aritajati <chulakornaritajati@gmail.com>