Bug fixes batch 2