cleanup + comparewithlib fix