Cache null pointer exception fixed