Solved problem about not expanding ~