Some small bug fixes.