bug fixes batch 2