Malik Beasley scored seven of his 20 points in the fourth quarter, Cade Cunningham had 15 points and 10 assists and the Detroit Pistons beat the struggling Toronto Raptors 99-95.