1. fix exception
2. support oldRegId