Switching to wx thread