fix code that can break your database...