Reorder startup sequence to prevent lockups when process is sent to background