fix quality flaws