fixed migration 5 to 6, cleanup debug lines