FIX: crash after optimization