When I print the Dictionary in the interpreter it works as desired but when I use it as Flask API return value the dictionary becomes a mess, all key-value pairs are miss-or