optimization bug.