Fix small bugs which are introduced in the recent commits.