cleaned up some code looking for the evil bug