bugs with logic