fixing ko scope issue