thought I fixed the odd layer NaN problem, but not yet