Fix for more types of newlines in buyFunction