fix some mistakes revealed by reading my diff