fixing lookup bugs