Fix errors in snapshot logic - wrong data, lack of null handling