Bug fixes

Bug fixes from the open testing