Fix it for real this time, and properly tested it.