Accessing data correctly

Signed-off-by: Martin Evans <martindevans@gmail.com>