Fix dictionary bug