Fix variable checks

Signed-off-by: Vlad <vg@vladgh.com>