Merge "Fix for the 'Unable to add window' crash."