Fix a couple logic bugs