Removed unsafe code from Replication.java

I forgot to move this over to the PR from our main fork.