Fixed errors occuring in getItem();