Fixes to the data layer