Added foundation 4.0.4 and 4.0.5 closes #986