silence the 'frame out of range' warning in optimized mode