more variable checking to avoid warnings