Fix a couple of bugs exposed by stricter server checks