Bug fixes

Jim