Solve some little bugs