Fix for daemonizing