Fixed a bug in joining depthfiles.