fixing bug where cached items would be assigned as arrays when retrieved a second time