Updated Foundation 4 compatibility