Fix couple of problems in compat code.