Fix dictionary update and key issues, update tests
Add max_size to direct_fetch