Fixes dictionary lookup bug. Closes #211