Catching boundary optimization cases