fix dict lookup