Logic fixed

Signed-off-by: shyeon.kim <kimseo@kth.se>