fix elsewhere refactor bugs (2)

Should fix #2077.