Fix depth merging.