fixed newFoo bug