Suggested fix for array_key_exists error

Regarding #107