Fixed logical issue / gcc warning

Signed-off-by: shennetsind <ind@henn.et>