bug fixes with fragment management