Fixed bug in dict comprehension