fixed foundation resource bug
merged