Some minor fixes for the smooth optimization functionality