Bugfix: memo field returned index as string. (Reported by Alex Grönholm)
Added some tests.