fix some small flaws