synching to bug fixes from egypt branch