Fixed object being disposed before it is passed back to the caller