Bug fixes so it wors better with html emails, and supercache