fix the dynamodb key sort