Fix device reboots on OS X.