Fixed bugs related to existing data

Signed-off-by: Darren Ehlers <me@darrenehlers.com>