Set the storedHandle to the doc so that it does not crash