Fix empty dictionry crash