Fix a packaging bug + some bug with the whitespace removing algorithm