fixed cache null pointer exception