Replaced array_key_exists() with isset().