bug fix; check var is not null