[api] fix crash on storing architectures for distributions via xml interface and fix xml rendering