Fixing the performance issue