Daemon mode fixing for gui and console