updated foundation to the last version, fixed some issues