fix and add cache clears