fix for foundation sometimes not running