Fixed breakage caused by optimization