Fix a raft of bugs in persons code