Fixed bugs introduced in recent commits.