database rename and fix bug