Fix some little bugs