Fixed backgrounding issue when stack is not yet initialised.