bugfix around binary replication