Fix layerwise recosntruction error