right before live
fixed error on foreach