fix for opt mode