Fix logic typo

Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>