Fixed no items in account problem.

When there were no items in the accounts the value for the ->data of the
chain returned was pointing to uninitialized garbage data. this has been
fixed.