Bug fixes from initial testing