fix error on optimizer render