Some minor small fixes.

This fixes some minor bugs.