Improved replication
Added a test to reproduce bug in APPLY("DEL", ...)