changed the way iterating over bugs to avoid frame drawing skips