more bug and bug test fixes.