Fixed major slow-down bug.