minor fixes
finalization, fixes in layers