fixed replicate data and modified database.