Fix two lookup bugs.