Fixed a failed optimization