Fixed bug with newlines in expand