Little fixes to cartographer.infer