Using spawn gives unexpected results. Change that