few fixes for foundation stuff