corrected layer order