Changed dictionary access from valueForKey to objectForKey