Remove more double refs, fix build