Fix space after foreach