Fixing bugs in dense registration with occlusions