refactor maybePersistPiece
fix port progress