Fixed some weird error in software.py (cannot close cache)