Fix issue when wrapping widgets between toolkits