Fixes dictionary access bug