smart fix bugs