Fix a couple of validation bugs