Asset Fixes

Fixes various problems with the asset library and its compatibility with
the database.