Changes to handle cases when items don't exist