General route for the decomposition of InAs quantum dots during the capping process