chore(foundation.js): fixed a bug