Storage access is compromising my function