fixed "Use of uninitialized value" warning