Fix some small bugs.