correct subtle bug
smarter