More undefined fixes