Small changes for DB compatibility