remove the space after foreach