some small fixes to platform and foundation