More logic bugs