Removed downcasing from array checks - these are now case-sensitive.