Fixes due to changes to database