fix some little bugs