Fixed some datastore bugs