fix some design flaws