Fixing a performance issue