fixed cp issue for database