Singleton and linewrap bugfix