Fixed some bugs related to UUID field, and Unique keys.