bug fixes to cache commands