Fixing Boost::Optional runtime crash