Fix demographics bugs.