fixing database schema change bug