Clean up in the correct order