Fixed a minor performance issue