Fixed opt bug