Fix a bunch of ADV440 bugs found by playtesting.