Improving the coherence time of a quantum system via a coupling with an unstable system