Bug fixes

Some small bug fixes.