Fix minor performance issue