Fixes checking undefined variable