foreach not work before