Fixed bug where contents was removed due to pointer access in cached items