Improved utility::capture