RF-13828: fix variable checking