copy pasta bug, I checked for key max_size, but then tried to access size