fixing bug clearing cache