Restore a fix which was lost during panda2 merge