fix bug migration id and folder, fix bug count failed